Memory clearing is an operation performed frequently by both firmware and operating system software. Firmware clears memory as part of the power-up self-testing done by the Basic Input Output System (BIOS) in today's personal computers. Operating systems clear pages of memory for applications that request memory. Typically, the operating system allocates a physical address or a location in memory to the application. The operating system clears the location in memory to put the location in a constant state before returning a pointer to the location. The clearing of memory is currently performed by executing code in the processor that results in zeros being written into the memory.
Memory-to-memory copy is another operation performed frequently by operating system software. Memory-to-memory copies are performed when a data structure at a first location in memory is copied to a second location in memory. Typically, when a copy is requested, the operating system allocates a physical address or a second location in memory to copy the data structure. The data structure is read and written into the second location in memory. Operating systems utilize the processor to complete these functions by executing code in the processor.
The clearing of memory and copying of memory through the execution of code in the processor consumes processor time that could otherwise be used to execute application code. When a plurality of memory requests are made that require large blocks of memory to be cleared or when a plurality of copying requests are made, the processor is prevented from executing application code for a significant amount of time. This adversely affects the overall performance of the computer system in running applications. In addition, cache memory within the processors have historically made this clearing and copying of memory particularly problematic in computer systems.